import GameEventListen from "./GameEventListen";

const {ccclass, property} = cc._decorator;

@ccclass
export default class OnEventMode extends cc.Component {

     protected on(type:string,callback:Function,target?:any,useCapture?:boolean){
       GameEventListen.ins().on(type,callback,target,useCapture)
   }

   protected emit(type:string,...args:any){
       GameEventListen.ins().emit(type,...args)
   }

   protected off(type:string,callback:Function,target?:any){
       GameEventListen.ins().off(type,callback,target)
   }
}
